package com.sky.controller.admin;

import com.sky.result.Result;

import com.sky.service.admin.WorkSpaceService;
import com.sky.vo.BusinessDataVO;
import com.sky.vo.DishOverViewVO;
import com.sky.vo.SetmealOverViewVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@Api(tags = "工作台相关接口")
@RequestMapping
public class WorkSpaceController {
    @Autowired
    private WorkSpaceService workSpaceService;
    @GetMapping("/admin/workspace/businessData")
    @ApiOperation("工作台展示")
    public Result<BusinessDataVO> businessData(){
        BusinessDataVO businessDataVO=workSpaceService.businessData();
        return Result.success(businessDataVO);
    }
    @GetMapping("/admin/workspace/overviewDishes")
    @ApiOperation("菜品总览")
    public Result<DishOverViewVO> overviewDishes(){
        DishOverViewVO dishOverViewVO=workSpaceService.overviewDishes();
        return Result.success(dishOverViewVO);
    }
    @ApiOperation("套餐总览")
    @GetMapping("/admin/workspace/overviewSetmeals")
    public Result<SetmealOverViewVO> overviewSetmeals(){
        SetmealOverViewVO setmealOverViewVO=workSpaceService.overviewSetmeals();
        return Result.success(setmealOverViewVO);
    }
}
